//
//  SearchNextViewController.m
//  ZPIOSEducation
//
//  Created by 董伟1 on 17/1/10.
//  Copyright © 2017年 mini1. All rights reserved.
//

#import "SearchNextViewController.h"
#import "SearchNextCell.h"

@interface SearchNextViewController () <UITableViewDelegate,UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UITextField *searchField;
@property (weak, nonatomic) IBOutlet UITableView *mainTableView;

@end

@implementation SearchNextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    self.mainTableView.delegate = self;
    self.mainTableView.dataSource = self;
    
}

- (IBAction)navLeftButtonClick:(id)sender
{
    [self.navigationController  popViewControllerAnimated:YES];
}

#pragma mark - UITableView Delegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 111.;
}

- (UITableViewCell  *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"SearchNextCell";
    SearchNextCell  *cell = (SearchNextCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"SearchNextCell" owner:self options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    
    cell.headerImv.image = [UIImage  imageNamed:@"Home_XuanKe"];
    cell.nameLab.text = @"蓝海";
    cell.scoreLab.text = @"9.9分";
    cell.classLab.text = @"开设班级:6";
    cell.classDetailLab.text = @"一年级、二年级、三年级、四年级、五年级";
    cell.addressLab.text = @"五棵松校区        数学";
    
    return cell;
    
}

#pragma mark - UIScrollView Delegate
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
    [self.searchField  resignFirstResponder];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
